package com.server.entity;

import com.alibaba.fastjson.annotation.JSONField;

import java.math.BigDecimal;
import java.util.Date;
import java.util.StringJoiner;

/**
 * The type Types.
 */
public class Types {
    private Integer typeId;

    private String typeName;

    private BigDecimal typeValue;

    @JSONField(format="yyyy-MM-dd HH:mm:ss")
    private Date ticketsCreate;

    /**
     * Instantiates a new Types.
     *
     * @param typeName      the type name
     * @param typeValue     the type value
     * @param ticketsCreate the tickets create
     */
    public Types(String typeName, BigDecimal typeValue, Date ticketsCreate) {
        this.typeName = typeName;
        this.typeValue = typeValue;
        this.ticketsCreate = ticketsCreate;
    }

    /**
     * Instantiates a new Types.
     */
    public Types() {
    }

    /**
     * Gets type id.
     *
     * @return the type id
     */
    public Integer getTypeId() {
        return typeId;
    }

    /**
     * Sets type id.
     *
     * @param typeId the type id
     */
    public void setTypeId(Integer typeId) {
        this.typeId = typeId;
    }

    /**
     * Gets type name.
     *
     * @return the type name
     */
    public String getTypeName() {
        return typeName;
    }

    /**
     * Sets type name.
     *
     * @param typeName the type name
     */
    public void setTypeName(String typeName) {
        this.typeName = typeName == null ? null : typeName.trim();
    }

    /**
     * Gets type value.
     *
     * @return the type value
     */
    public BigDecimal getTypeValue() {
        return typeValue;
    }

    /**
     * Sets type value.
     *
     * @param typeValue the type value
     */
    public void setTypeValue(BigDecimal typeValue) {
        this.typeValue = typeValue;
    }

    /**
     * Gets tickets create.
     *
     * @return the tickets create
     */
    public Date getTicketsCreate() {
        return ticketsCreate;
    }

    /**
     * Sets tickets create.
     *
     * @param ticketsCreate the tickets create
     */
    public void setTicketsCreate(Date ticketsCreate) {
        this.ticketsCreate = ticketsCreate;
    }

    @Override
    public String toString() {
        return new StringJoiner(", ", Types.class.getSimpleName() + "[", "]")
                .add("typeId=" + typeId)
                .add("typeName='" + typeName + "'")
                .add("typeValue=" + typeValue)
                .add("ticketsCreate=" + ticketsCreate)
                .toString();
    }
}